Adwaita: buttons on gtkvolume popup
authorLapo Calamandrei <calamandrei@gmail.com>
Tue, 8 Jul 2014 16:24:28 +0000 (18:24 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Tue, 8 Jul 2014 16:24:28 +0000 (18:24 +0200)
gtk/resources/theme/Adwaita/_common.scss
gtk/resources/theme/Adwaita/_drawing.scss
gtk/resources/theme/Adwaita/gtk-contained-dark.css
gtk/resources/theme/Adwaita/gtk-contained.css

index 4bc007a481351e53b0472c14b6461f213cd0425d..a68a115b411e404892ef516c066af3d89f7c3084 100644 (file)
@@ -1307,77 +1307,77 @@ GtkTreeView.view.progressbar { //Progressbar in treeview cells
  **********/
 
 GtkSwitch {
-    // FIXME: backdrop insensinsitive slider on the dark variant
-    -GtkSwitch-slider-width: 47px;
-    font: bold condensed 9;
-    outline-offset: -4px;
-    &.trough {
-      // similar to the .scale
-      border-width: 1px;
-      border-style: solid;
-      border-radius: 3px;
+  // FIXME: backdrop insensinsitive slider on the dark variant
+  -GtkSwitch-slider-width: 47px;
+  font: bold condensed 9;
+  outline-offset: -4px;
+  &.trough {
+    // similar to the .scale
+    border-width: 1px;
+    border-style: solid;
+    border-radius: 3px;
+    border-color: $borders_color;
+    background-color: mix($bg_color,$borders_color,60%);
+    box-shadow: inset 0 1px transparentize(black, 0.9); /*outset not working*/
+    text-shadow: 0 1px transparentize(black, 0.9);
+    &:active {
+      color: white;
+      border-color: $selected_borders_color;
+      background-color: $selected_bg_color;
+      box-shadow: $widget_edge;
+      text-shadow: 0 0 2px white;
+    }
+    &:insensitive {
+      color: $insensitive_fg_color;
       border-color: $borders_color;
-      background-color: mix($bg_color,$borders_color,60%);
-      box-shadow: inset 0 1px transparentize(black, 0.9); /*outset not working*/
-      text-shadow: 0 1px transparentize(black, 0.9);
+      background-color: $insensitive_bg_color;
+      box-shadow: $widget_edge;
+      text-shadow: none;
+    }
+    &:backdrop {
+      color: $backdrop_fg_color;
+      border-color: $backdrop_borders_color;
+      background-color: $backdrop_bg_color;
+      box-shadow: none;
+      text-shadow: none;
       &:active {
-        color: white;
-        border-color: $selected_borders_color;
+        color: $backdrop_bg_color;
+        border-color: $selected_bg_color;
         background-color: $selected_bg_color;
-        box-shadow: $widget_edge;
-        text-shadow: 0 0 2px white;
+        box-shadow: none;
       }
       &:insensitive {
-        color: $insensitive_fg_color;
-        border-color: $borders_color;
-        background-color: $insensitive_bg_color;
-        box-shadow: $widget_edge;
-        text-shadow: none;
-      }
-      &:backdrop {
-        color: $backdrop_fg_color;
-        border-color: $backdrop_borders_color;
-        background-color: $backdrop_bg_color;
-        box-shadow: none;
-        text-shadow: none;
-        &:active {
-          color: $backdrop_bg_color;
-          border-color: $selected_bg_color;
-          background-color: $selected_bg_color;
-          box-shadow: none;
-        }
-        &:insensitive {
-          color: $backdrop_insensitive_color;
-          border-color: $backdrop_insensitive_color;
-        }
+        color: $backdrop_insensitive_color;
+        border-color: $backdrop_insensitive_color;
       }
     }
-    &.slider {
-      border-radius: 3px;
-      @include button(normal, $noedge: true);
+  }
+  &.slider {
+    border-radius: 3px;
+    @include button(normal, $noedge: true);
+    box-shadow: inset 0 1px if($variant=='light', white,
+                               transparentize(white,0.85)),
+                inset 0 -2px transparentize($bg_color,0.4),
+                inset 0 -1px mix($bg_color,$borders_color,50%);
+    &:hover {
+      @include button(hover, $noedge: true);
       box-shadow: inset 0 1px if($variant=='light', white,
                                  transparentize(white,0.85)),
                   inset 0 -2px transparentize($bg_color,0.4),
                   inset 0 -1px mix($bg_color,$borders_color,50%);
-      &:hover {
-        @include button(hover, $noedge: true);
-        box-shadow: inset 0 1px if($variant=='light', white,
-                                   transparentize(white,0.85)),
-                    inset 0 -2px transparentize($bg_color,0.4),
-                    inset 0 -1px mix($bg_color,$borders_color,50%);
-      }
-      &:active { border: 1px solid $selected_borders_color; }
-      &:insensitive { @include button(insensitive, $noedge: true); }
-      &:backdrop { @include button(backdrop);
-        &:active{ border-color: $selected_bg_color; }
-        &:insensitive {
-          @include button(backdrop-insensitive);
-          @if $variant=='dark' {
-            border-color: $backdrop_insensitive_color;
-          }
+    }
+    &:active { border: 1px solid $selected_borders_color; }
+    &:insensitive { @include button(insensitive, $noedge: true); }
+    &:backdrop { @include button(backdrop);
+      &:active{ border-color: $selected_bg_color; }
+      &:insensitive {
+        @include button(backdrop-insensitive);
+        @if $variant=='dark' {
+          border-color: $backdrop_insensitive_color;
         }
       }
     }
+  }
 }
 
 /*************************
@@ -2186,6 +2186,22 @@ GtkColorChooserWidget #add-color-button {
 }
 
 
+/********
+ * Misc *
+ ********/
+
+.scale-popup .button { 
+  padding: 6px;
+  &:hover {
+    @extend %undecorated_button;
+    background-color: transparentize($fg_color,0.9);
+    border-radius: 4px;
+  }
+  &:backdrop,
+  &:backdrop:hover,
+  &:backdrop:insensitive { @extend %undecorated_button; }
+}
+
 /**********************
  * Window Decorations *
  *********************/
index efa00d38481b282ea0d90d2cbc6ad37320bdaad7..7c0d1a3b6fb6ef78b8f02c68cab1a4676b7132e8 100644 (file)
@@ -127,7 +127,8 @@ $widget_edge: 0 1px $borders_edge; //outer hilight "used" on
 //
 // possible $t values:
 // normal, hover, active, insensitive, insensitive-active,
-// backdrop, backdrop-active, backdrop-insensitive, backdrop-insensitive-active
+// backdrop, backdrop-active, backdrop-insensitive, backdrop-insensitive-active,
+// undecorated
 //
   border-style: solid;
 
@@ -320,7 +321,15 @@ $widget_edge: 0 1px $borders_edge; //outer hilight "used" on
     border-color: $osd_borders_color;
     color: $insensitive_fg_color;
   }
-  
+
+  @else if $t==undecorated {
+    border-color: transparent;
+    background-color: transparent;
+    background-image: none;
+    box-shadow: inset 0 1px transparentize(white,1);
+    text-shadow: none;
+    icon-shadow: none;
+  } 
 }
 
 @mixin trough($flat:false, $c:$bg_color, $tc:$fg_color, $noedge:false) {
index 7f56eb2399d4e14ec6cb96b2da29e5e6b5cedac7..c3590129f2c782bd936aef6f05f33e609e118175 100644 (file)
     border-radius: 3px;
     border-style: solid; }
 
-.button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover {
+.button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover, .scale-popup .button:hover, .scale-popup .button:backdrop, .scale-popup .button:backdrop:hover, .scale-popup .button:backdrop:insensitive {
   border-color: transparent;
   background-color: transparent;
   background-image: none;
@@ -2791,6 +2791,15 @@ GtkColorChooserWidget #add-color-button {
     border-color: #2b3030;
     background-color: #2b3030; }
 
+/********
+ * Misc *
+ ********/
+.scale-popup .button {
+  padding: 6px; }
+  .scale-popup .button:hover {
+    background-color: rgba(238, 238, 236, 0.1);
+    border-radius: 4px; }
+
 /**********************
  * Window Decorations *
  *********************/
index c6a0fcb447508a4357fe863b1b90958c4f175226..4bd70423342a88415758a3932ce95cd508b6241b 100644 (file)
     border-radius: 3px;
     border-style: solid; }
 
-.button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover {
+.button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover, .scale-popup .button:hover, .scale-popup .button:backdrop, .scale-popup .button:backdrop:hover, .scale-popup .button:backdrop:insensitive {
   border-color: transparent;
   background-color: transparent;
   background-image: none;
@@ -2783,6 +2783,15 @@ GtkColorChooserWidget #add-color-button {
     border-color: #cacaca;
     background-color: #cacaca; }
 
+/********
+ * Misc *
+ ********/
+.scale-popup .button {
+  padding: 6px; }
+  .scale-popup .button:hover {
+    background-color: rgba(46, 52, 54, 0.1);
+    border-radius: 4px; }
+
 /**********************
  * Window Decorations *
  *********************/